using Backoffice.Application.Common;
using BackOffice.Application.DTOs;

namespace BackOffice.Application.Services
{
    public interface IFileService
    {
        /* 文件相关 */
        Task<ApiResult> UploadFileAsync(UploadFileDto dto);
        Task<ApiResult> UpdateFileAsync(Guid id, UpdateFileDto dto);
        Task<ApiResult> DeleteFileAsync(Guid id);
        Task<ApiResult> GetFileListAsync(Guid? folderId);
        Task<ApiResult> MoveFileAsync(Guid id, Guid? targetFolderId);

        /* 文件夹相关 */
        Task<ApiResult> CreateFolderAsync(CreateFolderDto dto);
        Task<ApiResult> UpdateFolderAsync(Guid id, UpdateFolderDto dto);
        Task<ApiResult> DeleteFolderAsync(Guid id);
        Task<ApiResult> GetFolderTreeAsync(Guid? parentId = null);

        /* 分享 & 权限 */
        Task<ApiResult> ShareFileAsync(Guid fileId, ShareFileDto dto);
        Task<ApiResult> RevokeShareAsync(Guid shareId);
        Task<ApiResult> SetFileAclAsync(Guid fileId, SetFileAclDto dto);
        Task<ApiResult> SearchFilesAsync(FileSearchDto dto);

    }
}